#pragma GCC optimize(2)
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <vector>

using namespace std;
using LL = long long;
const int N = 20;

LL f[N];

int main(){
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int n;
    cin >> n;
    f[0] = 1;
    for(int i = 1; i <= n; i ++) f[i] = (LL) i * f[i - 1];
    cout << f[n] << '\n';


    return 0;
}